<template>
    <div v-if="Object.keys(commentInfo).length!==0">
        <div class="tit">
            <div class="h">
                <h3>用户评价</h3>
            </div>
            <div class="more">
                 <span>更多</span>
            </div>
        </div>
        <div class="comment">
            <div class="userInfo">
                <div class="userlogo"><img :src="commentInfo.user.avatar" alt=""></div>
                <div class="username">{{commentInfo.user.uname}}</div>
            </div>
            <div class="content">
                <p>{{commentInfo.content}}</p>
                <div class="item">
                    <span class="time">{{commentInfo.created || showDate}}</span>
                    <span class="style">{{commentInfo.style}}</span>
                </div>
                <div class="img">
                    <img :src="item" v-for="(item,index) in commentInfo.images" v-bind:key="index" alt="图片">
                </div>
            </div>
        </div>
    </div>
</template>
<script>
export default {
    name: "DetailCommentInfo",
    props:{
        commentInfo:{
            type:Object,
            default:function (){
                return {}
            }
        }
    },
    filters:{
        showDate(){

        }
    }
}
</script>

<style scoped>
.tit{
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
}
.tit h3{
    font-weight: normal;
}
.userInfo{
    display: flex;
}
.userInfo .userlogo{
    width: 50px;
    height: 50px;
}
.userInfo .userlogo img{
    max-width: 100%;
}
.userInfo  .username{
    height: 50px;
    line-height: 50px;
    margin-left: 15px;
}
.content p{
    padding: 8px 0;
}
.item span{
    font-size: 12px;
}
.item .time{
    margin-right: 10px;
}
.content .img{
    width: 60px;
    height: 60px;
    display: flex;
}
.content .img img{
    max-width: 100%;
}
</style>
